<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2018/9/16
  Time: 16:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>${userFile.getTitle()}</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="generator" content="HBuilder">
    <!-- css -->
    <link rel="stylesheet" href="../css/style-fileShow.css" type="text/css">
    <!--js-->
    <script src="../js/jquery-1.11.0.min.js" type="text/javascript"></script>
    <script src="../js/jquery.min.js" type="text/javascript"></script>
    <script>window.jQuery || document.write('<script src="../js/jquery-1.11.0.min.js"><\/script>')</script>
    <%@ include file="Markdown-view.jsp"%>
</head>
<body>
<!-- Page Content -->
<div id="file-view-content" style="padding: 0">
    <div id="content-box">
        <div id="viewHead">
            <div id="viewHead-content">
                <div id="viewHead-title">
                    <h1 id="title-content">${userFile.getTitle()}</h1>
                </div>
                <div id="viewHead-info">
                    <div id="info-content">
                        <span class="doc-date">${userFile.getDate()}</span>
                        <span class="doc-author">${userFile.getUserId()}</span>
                        <span class="doc-type">类型：${userFile.getType()}</span>
                    </div>
                </div>
            </div>
        </div>
        <article>
            <div id="viewSection"></div>
        </article>
    </div>
</div>
<!-- /Page Content -->

<!-- js-->
<script type="text/javascript">
    //markdown编辑器
    var content = "${userFile.getContent()}";
    var showEditor = new tui.Editor({
        el: document.querySelector('#viewSection'),
        initialValue: content,
        exts: ['table', 'uml'],
        language: 'zh'
    });
</script>
<!-- /js-->
</body>
</html>
